unit RFatLocacao;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, RLReport, RLParser;

type
  TFormRFatLocacao = class(TForm)
    RLReport1: TRLReport;
    RLBand1: TRLBand;
    RLDBText10: TRLDBText;
    RLImage1: TRLImage;
    RLDBText31: TRLDBText;
    RLDBText32: TRLDBText;
    RLLabel33: TRLLabel;
    RLLabel34: TRLLabel;
    RLDBText9: TRLDBText;
    RLLabel15: TRLLabel;
    RLDBText12: TRLDBText;
    RLLabel17: TRLLabel;
    RLGroup1: TRLGroup;
    RLBand7: TRLBand;
    RLLabel8: TRLLabel;
    RLLabel11: TRLLabel;
    RLLabel12: TRLLabel;
    RLLabel13: TRLLabel;
    RLLabel14: TRLLabel;
    RLDBText15: TRLDBText;
    RLDBText16: TRLDBText;
    RLDBText17: TRLDBText;
    RLDBText18: TRLDBText;
    RLDBText19: TRLDBText;
    RLBand8: TRLBand;
    RLLabel16: TRLLabel;
    RLLabel18: TRLLabel;
    RLLabel19: TRLLabel;
    RLDBText11: TRLDBText;
    RLDBText13: TRLDBText;
    RLDBText14: TRLDBText;
    RLDBText20: TRLDBText;
    RLLabel21: TRLLabel;
    RLLabel22: TRLLabel;
    RLDBText21: TRLDBText;
    RLBand6: TRLBand;
    RLLabel20: TRLLabel;
    RLDBResult2: TRLDBResult;
    RLDBResult4: TRLDBResult;
    RLLabel24: TRLLabel;
    RLExpressionParser1: TRLExpressionParser;
    RLBand3: TRLBand;
    RLDBText2: TRLDBText;
    RLDBText3: TRLDBText;
    RLDBText4: TRLDBText;
    RLDBText5: TRLDBText;
    RLDBText6: TRLDBText;
    RLDBText7: TRLDBText;
    RLDBText1: TRLDBText;
    RLBand2: TRLBand;
    RLLabel2: TRLLabel;
    RLLabel3: TRLLabel;
    RLLabel4: TRLLabel;
    RLLabel6: TRLLabel;
    RLLabel7: TRLLabel;
    RLLabel9: TRLLabel;
    RLLabel5: TRLLabel;
    RLLabel1: TRLLabel;
    RLDBText8: TRLDBText;
    RLDBResult1: TRLDBResult;
    RLLabel10: TRLLabel;
    RLLabel23: TRLLabel;
    RLDBText22: TRLDBText;
    RLDBText23: TRLDBText;
    procedure RLBand1BeforePrint(Sender: TObject; var PrintIt: Boolean);
    procedure RLLabel20BeforePrint(Sender: TObject; var Text: String;
      var PrintIt: Boolean);
    procedure RLGroup1BeforePrint(Sender: TObject; var PrintIt: Boolean);
  private
    { Private declarations }
    Obs : String;
  public
    { Public declarations }
  end;

var
  FormRFatLocacao: TFormRFatLocacao;

implementation

uses DMS, Geralsis, Geral, DMR;

{$R *.dfm}

procedure TFormRFatLocacao.RLBand1BeforePrint(Sender: TObject; var PrintIt: Boolean);
begin
    DMSr.dsEmpresaProp.DataSet.Open;
    if (GetParametro('LOGO') <> '') and ((pos('BMP',UpperCase(GetParametro('LOGO'))) > 0) or (pos('JPG',UpperCase(GetParametro('LOGO'))) > 0))then
        RLImage1.Picture.LoadFromFile(GetParametro('LOGO'));
end;

procedure TFormRFatLocacao.RLLabel20BeforePrint(Sender: TObject; var Text: String;
  var PrintIt: Boolean);
begin
    Text := text +' '+ obs;
end;

procedure TFormRFatLocacao.RLGroup1BeforePrint(Sender: TObject;
  var PrintIt: Boolean);
begin
    Obs := dmrel.dsRelat.DataSet.FieldByName('OBS1').AsString;
end;

end.
